<?php

namespace App\Model;

class UsersUpgradeModel extends BaseModel
{
    protected $table = 'users_upgrade';

    protected $fillable = [
        'user_id',
        'b_user_id',
        'vip_level'
    ];

    public function userInfo(): \Illuminate\Database\Eloquent\Relations\HasOne
    {
        return $this->hasOne(UsersModel::class,'user_id','user_id');
    }

    public function bUserInfo(): \Illuminate\Database\Eloquent\Relations\HasOne
    {
        return $this->hasOne(UsersModel::class,'user_id','b_user_id');
    }
}
